package com.guqj.pattern.builder.builder;

import java.util.List;

import com.guqj.pattern.builder.hero.Traxex;
import com.guqj.pattern.builder.modal.Equipment;
import com.guqj.pattern.builder.modal.Level;
import com.guqj.pattern.builder.modal.Skill;

public class TraxexBuilder implements HeroBuilder {

	private Traxex traxex;
    public String userName; // 玩家id
    public Level level; // 玩家等级
    public List<Skill> skills; // 学习技能点
    public List<Equipment> equipments; // 当前装备
    
	@Override
	public HeroBuilder userName(String name) {
		this.userName = name;
		return this;
	}

	@Override
	public HeroBuilder level(Level level) {
		this.level = level;
		return this;
	}

	@Override
	public HeroBuilder skill(List<Skill> skills) {
		this.skills = skills;
		return this;
	}

	@Override
	public HeroBuilder equipment(List<Equipment> equipments) {
		this.equipments = equipments;
		return this;
	}

	public Traxex build(){
		if (traxex == null) {
            traxex = new Traxex(this);
        }
        return traxex;
	}
}
